package com.dcbeida.bean;

public enum  CardEnum {


    SFZ(0,"身份证"),
    HZ(1,"护照"),
    GATXZ(2,"港澳通行证"),
    TBZ(3,"台胞证"),
    JRZ(4,"军人证"),
    ZRXLHZ(8,"自然销量患者"),
    QT(9,"其他");




    private int type;

    private String name;


    CardEnum(int type,String name){
        this.type =type;
        this.name=name;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public  static String getCardName(int type){
        for (CardEnum value : CardEnum.values()) {
             if(type == value.getType()){
                 return value.getName();
             }
        }
        return SFZ.getName();
    }

}
